package com.gx.util.core.core;

import org.springframework.util.MultiValueMap;
import org.springframework.web.multipart.MultipartFile;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class ActionMethod{

	private Object target;
    private Method method;

    public ActionMethod(Object target,Method method){
    	this.target = target;
    	this.method = method;
    }
    
	public Object getTarget() {
		return target;
	}
	public void setTarget(Object target) {
		this.target = target;
	}
	public Method getMethod() {
		return method;
	}
	public void setMethod(Method method) {
		this.method = method;
	}

	public Object call(Integer uid,Integer source,String version,String agrs,MultiValueMap<String,MultipartFile> map) throws InvocationTargetException, IllegalAccessException {
		return method.invoke(target, uid,source,version,agrs,map);
	}


}
